#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
    FILE* pf = fopen("tt.txt", "r");
    if (pf == NULL)
    {
        perror("fopen:1");
        return;
    }

    FILE* pq = fopen("data_copy.txt", "w");
    
    if (pq == NULL)
    {
        perror("fopen:2");
        return;
    }
   char ch;
    while((ch=fgetc(pf))!=EOF)
    {
        printf("%c", ch);

    }

    fclose(pf);
    fclose(pq);
    pf = NULL;
    pq = NULL;


    return 0;
}
